<?php

$accountId = array(
	'id'	=>	'accountID',
	'name'	=>	'accountID',
	'value'	=>	$accountId,
	'type'	=>	'hidden'
);

$alternate = array(
	'id'	=>	'alternate',
	'name'	=>	'alternate',
	'value'	=>	''
);
$name = array(
	'id'	=>	'name',
	'name'	=>	'name',
	'value'	=>	''
);
$backgroundColor = array(
	'id'	=>	'backgroundColor',
	'name'	=>	'backgroundColor',
	'value'	=>	'FFFFFF',
	'class'	=>	'iColorPicker',
	'style' => 'width:100px',
	'target_name'	=> 'ad_display',
	'target_attr'	=> 'background-color'
);

$borderColor = array(
	'id'	=>	'borderColor',
	'name'	=>	'borderColor',
	'value'	=>	'FFFFFF',
	'class'	=>	'iColorPicker',
	'style' => 'width:100px',
	'target_name'	=> 'ad_display',
	'target_attr'	=> 'border'
);

$textColor = array(
	'id'	=>	'textColor',
	'name'	=>	'textColor',
	'value'	=>	'000000',
	'class'	=>	'iColorPicker',
	'style' => 'width:100px',
	'target_name'	=> 'dis_ad_desc',
	'target_attr'	=> 'color'
);

$titleColor = array(
	'id'	=>	'titleColor',
	'name'	=>	'titleColor',
	'value'	=>	'0000FF',
	'class'	=>	'iColorPicker',
	'style' => 'width:100px',
	'target_name'	=> 'dis_ad_title',
	'target_attr'	=> 'color'
);

$urlColor = array(
	'id'	=>	'urlColor',
	'name'	=>	'urlColor',
	'value'	=>	'008000',
	'class'	=>	'iColorPicker',
	'style' => 'width:100px',
	'target_name'	=> 'dis_ad_url',
	'target_attr'	=> 'color'
);


$adUnitTypeOptions = $this->config->item('ad_unit_type', 'adsense');
$layoutOptions = $this->config->item('layout', 'adsense');
$cornerStylesOptions = $this->config->item('corner_styles', 'adsense');

$this->adgeek_view->backyard_header();

?>
<script language="javascript" type="text/javascript" src="/js/register_form.js"></script>
<script language="javascript" type="text/javascript" >
	
	jQuery(document).ready(function() {
		$("#dis_ad_title").css('color', $("#titleColor").val());
		$("#dis_ad_desc").css('color', $("#textColor").val());
		$("#dis_ad_url").css('color', $("#urlColor").val());
		$("#ad_display").css('background-color', $("#backgroundColor").val());
		$("#ad_display").css('border', "1px solid"+" "+$("#borderColor").val());
		
	});
	

</script>
<div id="content">
   		<div class="mainTitle">
        	<h3>AFC Code Generator</h3>
            <div class="nav">
           	  
            </div>
        </div>
        <div class="main">
            <div class="apply">
                <div>
                <div class="tit">
                	<span class="subTitle">帳戶資訊</span>
                	<p>請先確認帳戶無誤，再進行廣告程式碼產生</p>
                </div>
                <ul>
                	<li>Account ID</li>
                    <li class="box">
                    	<?php echo $accountId['value']; ?>
                    </li>
                    <li class="error">
                    	
                    </li>
                </ul>
                <ul>
                    <li>網址：</li>
                    <li class="box">
                    	<?php echo $websiteUrl; ?>
                    </li>
                    <li class="error">
                    </li>
                </ul>
                <ul>
                    <li>廣告類型：</li>
                    <li class="box">
                    	<?php
                    		echo $synServiceTypes;
                    	?>
                    </li>
                    <li class="error">
                    </li>
                </ul>
                <ul>
                    <li>修改／新增時間：</li>
                    <li class="box">
                    	<?php
                    		echo $modifiedTime;
                    	?>
                    </li>
                    <li class="error">
                    </li>
                </ul>
                
                <ul class="first">
                	<li><span>*</span>為必填欄位</li>
                </ul>
                <div class="tit">
                	<span class="subTitle">廣告程式碼</span>
                	<p>注意！廣告程式碼產生後，此程式碼即會建立於此帳戶中</p>
                </div>
                <ul>
                    <li><span>*</span>Account ID：</li>
                    <li class="box">
                    	<?php echo $accountId['value']; ?>
                    	<?php echo form_input($accountId); ?>
                    </li>
                    <li class="error">
                    </li>
                </ul>
                <ul>
                    <li><span>*</span>廣告單元類型：</li>
                    <li class="box">
                    	<?php echo form_dropdown('adUnitType',$adUnitTypeOptions,'TextOnly','id="adUnitType"'); ?>
                    </li>
                    <li class="error">
                    </li>
                </ul>
                <ul>
                    <li><span>*</span>廣告版面配置：</li>
                    <li class="box">
                    	<?php echo form_dropdown('layout',$layoutOptions,'728x90','id="layout"'); ?>
                    </li>
                    <li class="error">
                    </li>
                </ul>
                <ul>
                    <li><span>*</span>廣告樣式：</li>
                </ul>
                <div id="ad_element">
                <ul class="colorPicker">
                    <li class="box">
                    	名稱：<?php echo form_input($name); ?>
                    </li>
                </ul>
               	<ul class="colorPicker">
                    <li class="box">
                    	背景：<?php echo form_input($backgroundColor); ?>
                    	<a href="javascript:void(null)" id="icp_backgroundColor" onclick="iColorShow('backgroundColor','icp_backgroundColor')"><img src="/images/choice_btn.jpg" style="border:0;margin:0 0 0 3px" align="absmiddle" /></a>
                    </li>
                </ul>
               	<ul class="colorPicker">
                    <li class="box">
                    	邊框：<?php echo form_input($borderColor); ?>
                    	<a href="javascript:void(null)" id="icp_borderColor" onclick="iColorShow('borderColor','icp_borderColor')"><img src="/images/choice_btn.jpg" style="border:0;margin:0 0 0 3px" align="absmiddle" /></a>
                    </li>
                </ul>
               	<ul class="colorPicker">
                   	<li class="box">
                    	文字：<?php echo form_input($textColor); ?>
                    	<a href="javascript:void(null)" id="icp_textColor" onclick="iColorShow('textColor','icp_textColor')"><img src="/images/choice_btn.jpg" style="border:0;margin:0 0 0 3px" align="absmiddle" /></a>
                    </li>
                </ul>
                <ul class="colorPicker">
                   	<li class="box">
                    	標題：<?php echo form_input($titleColor); ?>
                    	<a href="javascript:void(null)" id="icp_titleColor" onclick="iColorShow('titleColor','icp_titleColor')"><img src="/images/choice_btn.jpg" style="border:0;margin:0 0 0 3px" align="absmiddle" /></a>
                    </li>
                </ul>
                <ul class="colorPicker">
                   	<li class="box">
                    	網址：<?php echo form_input($urlColor); ?>
                    	<a href="javascript:void(null)" id="icp_urlColor" onclick="iColorShow('urlColor','icp_urlColor')"><img src="/images/choice_btn.jpg" style="border:0;margin:0 0 0 3px" align="absmiddle" /></a>
                    </li>
                </ul>
                </div>
                <div id="ad_display">
                	<a id="dis_ad_title"><span>廣告標題</span></a>
                	<div id="dis_ad_desc">廣告文字</div>
                	<div><span id="dis_ad_url">www.advertiser-url.com</span></div>
                	<!--<div style="float:right;"><span id="dis_google_supply">Google 提供的廣告</span></div>-->
                </div>
                <ul>
                    <li><span>*</span>廣告角樣式：</li>
                    <li class="box">
                    	<?php echo form_dropdown('cornerStyles',$cornerStylesOptions,'DEFAULT','id="cornerStyles"'); ?>
                    </li>
                    <li class="error">
                    </li>
                </ul>
                <!--
                <ul>
                    <li>廣告的替代內容：</li>
                    <li class="box">
                    	<?php echo form_input($alternate) ?>
                    </li>
                    <li class="error">
                    </li>
                </ul>
                -->
                <!--
                <ul>
                    <li>自訂廣告頻道：</li>
                    <li class="box">
                    	<?php echo form_dropdown('channelName',$channelNameOptions,'','id="channelName"'); ?>&nbsp;<a href="javascript:;" onclick="createAfcChannelForm()">新增</a>
                    </li>
                    <li class="error">
                    </li>
                </ul>
                <div class="tit">
                	<p style="font-size:11px;">用來追蹤此網頁統計資料的頻道。頻道類型必須屬於自訂。如果沒有要指定的頻道，請留空</p>
                </div>
                <ul>
                    <li>代管頻道：</li>
                    <li class="box">
                    	<?php echo form_dropdown('hostChannelNames',$hostChannelNameOptions,'','id="hostChannelNames"'); ?>&nbsp;<a href="javascript:;" onclick="createHostChannelForm()">新增</a>
                    </li>
                </ul>
                <div class="tit">
                	<p style="font-size:11px;">用來追蹤此廣告程式碼統計資料的 AdSense 內容廣告代管頻道清單。如果您不是使用代管頻道，請留空。</p>
                </div>
                -->
               </div>
        	</div>
        	<div class="legal">
                <ul>
                    <li class="confirm_submit"><a href="javascript:;" onclick="saveAdStyle('false')"  title="新增" class="btn btn_blue">新增</a>
                    <a href="javascript:;" onclick="getAdCodeForm('<?php echo $accountId['value']; ?>');"  title="取得程式碼" class="btn btn_blue">取得程式碼</a>
                    <span id="loading" style="display:none;"><img src="/images/ajax-loader-circle.gif" /></span>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<?php
$this->adgeek_view->footer();
?>